<html>
<head>
</head>
<a href="index.php?controlador=comprar"><br>
</a>
<form action="index.php">
	<?php
if($_SESSION["browser"]=="iPhone")
{
echo "<div style='width:500px;'>";	
}
?>
<table width="90%">
<tr>
<td>
</form>
<table border="1" width="70%">
	<tr align="center">
		<td><strong> Id </strong></td>
		<td><strong> Descripcion </strong></td>
		<td><strong> Precio </strong></td>
		<td><strong> Proveedor </strong></td>
		<td><strong> Foto </strong></td>
		<td><strong> Comprar </strong></td>
	</tr>
	<?php
	if (@$datos)
	foreach ($datos as $key => $row) //Associative array $key = table, $row = row of $key
	{
		?>
	<tr>
		<td><?php echo $row['id'] ?></td>
		<td><?php echo $row['descripcion'] ?></td>
		<td>$<?php echo number_format($row['precio'],0) ?></td>
		<td><?php echo $row['proveedor'] ?></td>
		<td align="center"><img height="60" width="60" src="<?php echo $row['foto'] ?>"></td>
		<td align="center"><a href="index.php?controlador=agregarArticulo&id=<?php echo $row['id'] ?>"><img alt="Agregar" src="imagenes/add.gif"></a>
		</td>
	</tr>
	<?php } //end foreach loop
	?>
</table>
<a href="index.php?controlador=comprar">Comprar</a>
</td></tr></table>
<?php
if($_SESSION["browser"]=="iPhone")
{
echo "</div>";	
}
?>
</html>